<template>
	<view>
		<u-tabs :list="list" active-color="orange" :current="current" @change="change"></u-tabs>
		<view class="main">
			<!-- 知乎 -->
			<zh v-if="current == 0"></zh>

			<!-- 哔哩哔哩 -->
			<blbl v-if="current == 1"></blbl>

			<!-- 抖音 -->
			<dy v-if="current == 2"></dy>

			<!-- 百度贴吧 -->
			<bdtb v-if="current == 3"></bdtb>

			<!-- 天涯 -->
			<ty v-if="current == 4"></ty>

			<!-- 历史上的今天 -->
			<lssdjt v-if="current == 5"></lssdjt>

			<!-- 开眼视频 -->
			<kysp v-if="current == 6"></kysp>

			<!-- CSDN -->
			<csdn v-if="current == 7"></csdn>

			<!-- 36氪 -->
			<ke v-if="current == 8"></ke>

			<!-- 吾爱破解 -->
			<wapj v-if="current == 9"></wapj>
		</view>
	</view>
</template>

<script>
	import zh from '../../components/zh.vue'
	import blbl from '../../components/blbl.vue'
	import dy from '../../components/dy.vue'
	import bdtb from '../../components/bdtb.vue'
	import ty from '../../components/ty.vue'
	import lssdjt from '../../components/lssdjt.vue'
	import kysp from '../../components/kysp.vue'
	import csdn from '../../components/csdn.vue'
	import ke from '../../components/ke.vue'
	import wapj from '../../components/wapj.vue'
	export default {
		components: {
			zh,
			blbl,
			dy,
			bdtb,
			ty,
			lssdjt,
			kysp,
			csdn,
			ke,
			wapj
		},
		data() {
			return {
				list: [{
						name: '知乎'
					}, {
						name: '哔哩哔哩'
					},
					{
						name: '抖音'
					},
					{
						name: '百度贴吧'
					},
					{
						name: '天涯'
					},
					{
						name: '历史上的今天'
					},
					{
						name: '开眼视频'
					},
					{
						name: 'CSDN'
					},
					{
						name: '36氪'
					},
					{
						name: '吾爱破解'
					},
				],
				current: 0,
			}
		},
		methods: {
			change(index) {
				this.current = index;
				// localStorage.setItem("current", this.current)
			}
		}

	}
</script>

<style>
	.main {
		margin: 0px 5px;
		padding: 8px 5px;
		width: 97%;
		border-radius: 12px 12px 0 0;
		background-color: #fff;
	}
</style>
